
package com.cctv.haierstore.coupon.dao;



public class test {

    public static void main(String args[]) {
        int [] nums = new int[]{2,7,11,15,2};
        int target = 9;
        for(int i = 0;i<nums.length;i++){
            int temp =target - nums[i];
            for(int j=i+1;j<nums.length;j++){
                if(nums[j]==temp){
                    System.out.println("nums["+j+"]");
                }
            }
        }
    }

}